Repository navigation
fix(search): retry user-delimited script phrases on empty FTS - #2194
mikemikimike wants to merge 2 commits into
Conversation
Signed-off-by: mikemikimike <13286568797@163.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d180a2ea9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if not search_text: | ||
| return None | ||
| script_query = analyze_script_query(search_text.strip()) | ||
| if len(script_query.gram_phrases) < 2: |
There was a problem hiding this comment.
Gate script retries with the shared eligibility rules
In hybrid retrieval, a query that the shared guard intentionally deems ineligible can still pass this check: SearchReader.hybrid() always sets allow_relaxed=True, so 適者/生存 (one punctuation-joined token for which relaxed_query_words() returns None) is analyzed as two gram_phrases and retried as 適者 OR 生存 after a strict miss. The equivalent PostgreSQL len(script_conditions) >= 2 branch does the same, causing hybrid results to include notes containing only one half even though FTS mode preserves the query as strict; require the user-delimited/central relaxation eligibility here rather than raw script-run count.
Useful? React with 👍 / 👎.
|
Thanks for picking up #2183 so quickly across both SQLite and Postgres (and for catching the pre-existing Postgres Three concrete edge cases I noticed while reviewing and testing
|
Signed-off-by: mikemikimike <13286568797@163.com>
|
Thanks for the thoughtful follow-up in
|
Summary
Tests
Fixes #2183
Original issue: #2183